package com.klikmee.sms.core.base.communicator;

import com.klikmee.sms.core.model.OutgoingMessage;

/**
 * This component is responsible for resolving outgoing message that delivery report is received for.
 * Every provider has a different way of matching delivery reports to messages.
 */
public interface DeliveryReport2MessageResolver {
	/**
	 * Delivery report is transfered to core via outgoing message object, containing just the
	 * minimal amount of delivery report data. This must be matched to the outgoing message actually sent
	 * to the user.
	 * @param deliveryReport delivery report data in form of {@link OutgoingMessage}
	 * @return the actual outgoing message matching that the delivery report is received for
	 */
	public OutgoingMessage resolve(OutgoingMessage deliveryReport);
}
